package com.yunsc.store.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yunsc.common.serializer.TimestampToDateSerializer;
import lombok.Data;

import java.io.Serializable;

/**
 * 配送模板区域及运费表
 * 
 * @author adan
 * @email 2028038953@qq.com
 * @date 2024-04-05 01:37:47
 */
@Data
@TableName("yunsc_delivery_rule")
public class YunscDeliveryRuleEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 规则ID
	 */
	@TableId
	private Integer ruleId;
	/**
	 * 配送模板ID
	 */
	private Integer deliveryId;
	/**
	 * 可配送区域(城市id集)
	 */
	private String region;
	/**
	 * 可配送区域(文字展示)
	 */
	private String regionText;
	/**
	 * 首件(个)/首重(Kg)
	 */
	private Double first;
	/**
	 * 运费(元)
	 */
	private String firstFee;
	/**
	 * 续件/续重
	 */
	private Double additional;
	/**
	 * 续费(元)
	 */
	private String additionalFee;
	/**
	 * 商城ID
	 */
	private Integer storeId;
	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@JsonSerialize(using = TimestampToDateSerializer.class)
	private Integer createTime;

	/**
	 * 运费计算方式
	 */
	@TableField(exist = false)
	private Integer method;

}
